﻿<%@page import="com.hospital.util.DbUtil"%>
<%@page import="java.util.*"%>
<%@page import="com.hospital.model.PatientInfo"%>
<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
<link href="images/main.css" rel="stylesheet" type="text/css" />
<link  href="../css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../js/trim.js"></script>
<script language="javascript" type="text/javascript" src="../My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript">
	function sub() {
		var addmoney = document.getElementById("addmoney");
		if(trim(addmoney.value).length == 0){
			alert("充值金额不能为空。");
			addmoney.focus();
		}else{
			document.forms["form"].submit();
		}
	}
</script>
</head>
<body>
	<jsp:include page="right_top.jsp"></jsp:include>
	<!-- TOP START -->
	<div id="right_font">
		<img src="images/main_14.gif" /> 您现在所在的位置：首页 → 用户信息管理 → <span
			class="bfont">病人卡片充值</span>
	</div>
	<!-- TOP END -->
	<hr >
	<form action="PatientMoneyServlet?method=modify" method="post" name="form" id="form">
	<table style="margin-top: 30px;">
			<tr height="30px;">
				<td><font color="#FF0000">*</font>用户名：</td>
				<td>
					<select name="account" id="account">
					<%
						String sql = "select * from t_patient_info where root = 5 or 6";
						List<Map<String, Object>> list = DbUtil.find(sql);
						Map<String, Object> map = null;
						for (int i = 0; i < list.size(); i++) {
							map = (Map<String, Object>)list.get(i);
					%>
						<option value="<%=(String)map.get("account")%>"><%=map.get("account") %></option>
					<% 
						}
					%>
					</select>
				</td>
				<td width="220px;"><span id="usermsg"></span></td>
			</tr>
			<tr height="30px;">
				<td><font color="#FF0000">*</font>充值金额：</td>
				<td><input type="text" name="addmoney" id="addmoney"></td>
				<td>&nbsp;</td>
			</tr>
			<tr height="30px;">
				<td colspan="2" align="center">
					${rs}
				</td>
				<td>&nbsp;</td>
			</tr>
			<tr height="30px;">
				<td colspan="2" align="center">
					<input type="button" value="提交" onclick="sub();"/>&nbsp;&nbsp;
				</td>
				<td>&nbsp;</td>
			</tr>
		</table>
	</form>
</body>
</html>